package cn.datawin.cmppserver.netway.service;

import cn.datawin.sms.cmpp2.InboxLog;
import cn.datawin.sms.cmpp2.SmsDetailLog;
import cn.datawin.sms.cmpp2.ReportLog;
import com.drondea.sms.channel.ChannelSession;
import com.drondea.sms.message.IMessage;

/**
 * 网关业务
 *
 * @author Lenovo
 */
public interface ITcpService {

    /**
     * 下游提交保存input
     * @param smsDetailLog
     * @return
     * @throws Exception
     */
    int saveInput(SmsDetailLog smsDetailLog) throws Exception;

    /**
     * 获取用户的回执推送信息
     *
     * @param channelSession
     * @param entity
     * @return
     */
    IMessage getReportMessage(ChannelSession channelSession, ReportLog entity);

    /**
     * 获取上行推送信息
     * @param channelSession
     * @param inbox
     * @return
     */
    IMessage getMOMessage(ChannelSession channelSession, InboxLog inbox);

    String genLocalCacheKey(String batchNumber, String account);
}
